Virtual-reality head-mounted displays (HMDs) have wide applications in various fields, including engineering design, medical surgery practice, military simulated practice, video gaming, etc. Some HMDs include a mobile electronic device (e.g., a smartphone) that is inserted into a headset and used for displaying virtual-reality images. In such instances, motion data captured by a factory-installed inertial measurement unit of the mobile electronic device is used to generate the images. However, factory-installed inertial measurement units may not be sufficiently calibrated, if calibrated at all, and consequently, a user's virtual reality experience typically suffers.